﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Linq;
using System.Windows.Media;

namespace vmlModel.Entities
{
    public class vmlObject
    {
        /// <summary>
        /// 
        /// </summary>
        public XElement vmlObjElement { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string vmlObjXml { get { return vmlObjElement.ToString(); } }
        /// <summary>
        /// 
        /// </summary>
        public string vmlObjID { get; set; }

        public List<string> LiveAtrrs
        {
            get {
                return (from attr in vmlObjElement.Attributes()
                        select attr.Name.LocalName).ToList(); 
            }
        }

         public vmlObject()
        {
        }
        public vmlObject(XElement _vmlObjElement)
        {
            vmlObjElement = _vmlObjElement;
            XAttribute xID = _vmlObjElement.Attribute("id");
           vmlObjID = (xID != null)? xID.Value :"";
         }

    }
}
